# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1SecurityIncident do
  @moduledoc """
  Represents an SecurityIncident resource.

  ## Attributes

  *   `detectionTypes` (*type:* `list(String.t)`, *default:* `nil`) - Output only. Detection types which are part of the incident. Examples: Flooder, OAuth Abuser, Static Content Scraper, Anomaly Detection.
  *   `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. Display name of the security incident.
  *   `firstDetectedTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when events associated with the incident were first detected.
  *   `lastDetectedTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when events associated with the incident were last detected.
  *   `lastObservabilityChangeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time when the incident observability was last changed.
  *   `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Name of the security incident resource. Format: organizations/{org}/environments/{environment}/securityIncidents/{incident} Example: organizations/apigee-org/environments/dev/securityIncidents/1234-5678-9101-1111
  *   `observability` (*type:* `String.t`, *default:* `nil`) - Optional. Indicates if the user archived this incident.
  *   `riskLevel` (*type:* `String.t`, *default:* `nil`) - Output only. Risk level of the incident.
  *   `trafficCount` (*type:* `String.t`, *default:* `nil`) - Total traffic detected as part of the incident.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :detectionTypes => list(String.t()) | nil,
          :displayName => String.t() | nil,
          :firstDetectedTime => DateTime.t() | nil,
          :lastDetectedTime => DateTime.t() | nil,
          :lastObservabilityChangeTime => DateTime.t() | nil,
          :name => String.t() | nil,
          :observability => String.t() | nil,
          :riskLevel => String.t() | nil,
          :trafficCount => String.t() | nil
        }

  field(:detectionTypes, type: :list)
  field(:displayName)
  field(:firstDetectedTime, as: DateTime)
  field(:lastDetectedTime, as: DateTime)
  field(:lastObservabilityChangeTime, as: DateTime)
  field(:name)
  field(:observability)
  field(:riskLevel)
  field(:trafficCount)
end

defimpl Poison.Decoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1SecurityIncident do
  def decode(value, options) do
    GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1SecurityIncident.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Apigee.V1.Model.GoogleCloudApigeeV1SecurityIncident do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
